package com.sg.dto.biz.app.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;


/**
 * @desc PrimaryTargetObjDto
 * @使用场景
 */
@Data
public class PrimaryTargetObjDto extends BaseDto implements Serializable {

    /**
     * 指标ID
     */
    @NotNull(message = "指标ID不能为空")
    @ApiModelProperty("指标ID")
    private String objectiveId;

    /**
     * 冗余指标业务类型 NUMBER_GROWTH:数量增长型 NUMBER_DECLINE:数量降幅型 PERCENTAGE_GROWTH:百分比增长型 PERCENTAGE_DECLINE:百分比降幅型 PROGRESS:进度型 RATIO_GROWTH:比率增长型 RATIO_DECLINE:比率降幅型 SUBJECTIVE_QUALITATIVE:主观定性
     */
    @NotNull(message = "冗余指标业务类型不能为空")
    @ApiModelProperty("冗余指标业务类型")
    private String targetValueType;

    /**
     * 关联末级目标分类ID
     */
    @NotNull(message = "关联末级目标分类ID不能为空")
    @ApiModelProperty("关联末级目标分类ID")
    private String correlationLastTargetCatId;

    /**
     * 冗余一级目标分类ID
     */
    @NotNull(message = "冗余一级目标分类ID不能为空")
    @ApiModelProperty("冗余一级目标分类ID")
    private String rootTargetCategoryId;

    /**
     * 冗余目标ID
     */
    @NotNull(message = "冗余目标ID不能为空")
    @ApiModelProperty("冗余目标ID")
    private String targetId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        PrimaryTargetObjDto that = (PrimaryTargetObjDto) o;
        return objectiveId == that.objectiveId && targetValueType == that.targetValueType && correlationLastTargetCatId == that.correlationLastTargetCatId && rootTargetCategoryId == that.rootTargetCategoryId && targetId == that.targetId;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), objectiveId, targetValueType, correlationLastTargetCatId, rootTargetCategoryId, targetId);
    }


}
   